package com.judian.smart.interfaces;

import com.judian.smart.model.Device;
import com.judian.smart.model.DeviceType;
import com.judian.smart.model.Floor;
import com.judian.smart.model.GateWay;
import com.judian.smart.model.GatewayType;
import com.judian.smart.model.Mode;
import com.judian.smart.model.ModeList;
import com.judian.smart.model.Products;
import com.judian.smart.model.RedInfra;
import com.judian.smart.model.Room;
import com.judian.smart.model.VoiceInfo;

import java.util.List;

/**
 * author: Peter
 * date: 2019/08/09 星期五 10:52
 * desc:
 */
public interface IWidgetDAO {

    List<GateWay> getGateWay();

    List<GatewayType> getGateWayType();

    List<Mode> getMode();

    List<ModeList> getModeList();

    List<Room> getRoom();

    List<Device> getDevices();

    List<DeviceType> getDeviceTypes();

    int insertRoom(Room room);

    int insertDevice(Device device);

    int insertMode(Mode mode);

    int insertGateWay(GateWay gateWay);

    int insertModeList(ModeList modeList);

    int updateModeList(ModeList modeList);

    int updateMode(Mode mode, String modeName);

    int updateDevice(Device device);

    void updateDeviceTypeSort(List<DeviceType> list);

    int updateGateWay(GateWay gateWay, String gateWayName);

    int updateFraID(String deviceID, int infra_index);

    void updateDeviceSort(List<Device> list);

    void updateModeSort(List<Mode> list);

    void updateRoomSort(List<Room> list);

    void updateModeListSort(List<ModeList> list);

    void updateDeviceType(DeviceType list);

    int updateIsCurrent(int id, int current);

    int updateRoom(Room room, String arceName);

    void updateRoomHide(int homePageDisplays, int id);

    int deleteGateWay(int Id);

    int deleteRoom(int id);

    int deleteRedFra(int id);

    int deleteMode(int id);

    int deleteDevice(int id);

    int deleteModelist(int id);

    int deleteInfrad(int id);

    int deleteSyncData(String table);

    void execSQL(String sql);

    List<Products> getProducts();

    List<RedInfra> getInfrareds();

    int insertVoice(VoiceInfo voiceInfo);

    List<Floor> getFloor();

    int insertInfrad(RedInfra infrared);

    String getProductsCodeByProductsKey(int productsKey);

    List<Device> getSafeDevice();

    List<Device> getModeDevice(int modeById);

    void updateGatewaySort(List<GateWay> list);

    boolean checkColumnExist(String tableName, String columnName);
}
